<div
  class="user {{if this.rank.isCurrentUser 'user-highlight'}}"
  id="leaderboard-user-{{this.rank.id}}"
>
  <div class="user__rank {{if this.rank.topRanked '-winner'}}">{{#if
      this.rank.topRanked
    }}
      {{d-icon "crown"}}
    {{else}} {{sum this.index 1}}{{/if}}</div>
  <div
    class="user__avatar clickable"
    role="button"
    data-user-card={{this.rank.username}}
  >
    {{avatar this.rank imageSize="small"}}
    {{#if this.rank.isCurrentUser}}
      <span class="user__name">{{i18n "gamification.you"}}</span>
    {{else}}
      <span class="user__name">
        {{#if this.siteSettings.prioritize_username_in_ux}}
          {{this.rank.username}}
        {{else}}
          {{or this.rank.name this.rank.username}}
        {{/if}}
      </span>
    {{/if}}
  </div>
  <div class="user__score">
    {{number this.rank.total_score}}
  </div>
</div>